<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>字典管理界面</title>
	<link href="../lib/layui/css/layui.css" rel="stylesheet" type="text/css" media="screen" />
	<script src="../lib/layui/layui.js" type="text/javascript" ></script>
	<script src="../lib/jquery-3.3.1.min.js" type="text/javascript" ></script>
	<script src="../js/dict/dict.js" type="text/javascript" ></script>
	<script type="text/html" id="toolbarDemo">
		<div class="layui-btn-container">
			<button class="layui-btn layui-btn-sm" id="addDictItem" lay-event="addDictItem">添加字典项</button>
			<button class="layui-btn layui-btn-sm" id="add2DictItem" lay-event="add2DictItem">添加二级字典项</button>
		</div>
	</script>
	<script type="text/html" id="toolbarDemo2">
		<div class="layui-btn-container">
			<button class="layui-btn layui-btn-sm" id="add3DictItem" lay-event="add3DictItem">添加三级字典项</button>
		</div>
	</script>
	<style>
		/*thead th,tbody, .layui-layer, .layui-layer-content, .layui-form,.layui-table-box,.layui-input, .layui-layer-dialog{*/
		/*	background-color: rgb(23,34,53) !important;*/
		/*}*/
		/*label, .layui-table-cell, .layui-layer-title, .layui-form-select dd, li,.layui-layer-setwin,.layui-layer-content*/
		/*,.layui-form-radio div,.layui-input,.layui-table-page span,button{*/
		/*	color: rgb(173, 178, 187) !important;*/
		/*}*/
	</style>
</head>
<body class="layui-hide" style="background-color:white">

<div class="query" style="margin-bottom: 10px">
	字典类型：
	<div class="layui-inline">
		<div class="layui-form">
			<div class="layui-input-inline">
				<select id="typeId" name="typeId" lay-filter="typeId" lay-verify="required" lay-search>
					<option value=''>请搜索或选择</option>
				</select>
			</div>
		</div>
	</div>

	<button class="layui-btn" data-type="reload" id="reload">搜索</button>
	<button class="layui-btn" data-type="generateDictType" id="generateDictType">添加字典类型</button>
	<button class="layui-btn" data-type="updateType" id="updateType">修改字典类型</button>
	<button class="layui-btn" data-type="deleteType" id="deleteType" lay-event="del">删除字典类型</button>
	<button class="layui-btn" type="button" id="import" >导入</button>
	<button class="layui-btn" type="button" id="export" >导出</button>
	<button class="layui-btn" type="button" id="deleteAll" >全部删除</button>
	<button class="layui-btn" type="button" id="refresh" >刷新</button>
</div>

<table id="dictAction" lay-filter="dictAction" ></table>
<div id="dict2WindowDiv" hidden >
	<table class="layui-table" id="dict2Action" lay-filter="dict2Action"></table>
</div>
<div id="dict3WindowDiv" hidden >
	<table class="layui-table" id="dict3Action" lay-filter="dict3Action"></table>
</div>
<div id="upload" style="display: none">
	<form class="layui-form" style="margin-top:5%;margin-left: 1%">
		<div class="layui-input-inline" style="margin-left: 20px;margin-top: 2px;">
			<input type="text" id="file_name" name="file" lay-verify="required" style="width: 350px"  readonly autocomplete="off" class="layui-input">
		</div>
		<button type="button" class="layui-btn" id="uploadBtn">
			<i class="layui-icon">&#xe67c;</i>选择文件
		</button>
		<input type="file" style="display:none" class="layui-btn" id="uploadFile">
		<button style="margin-top: 5px;margin-left: 20px" class="layui-btn" id="upload_form" lay-submit="" lay-filter="upload_form">提交上传</button>
	</form>
</div>
<!-- 添加字典类型弹框 -->
<div id="generateDictType-main" class="layui-layout-body" style="display: none;">
	<form class="layui-form" action=""  id="generateDictTypeAciton" lay-filter="generateDictTypeAciton" >


		<div class="layui-form-item">
			<label class="layui-form-label">类別名称</label>
			<div class="layui-input-inline">
				<input type="text" name="typeName" id="typeName" required  lay-verify="required" autocomplete="off" class="layui-input">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">类别说明</label>
			<div class="layui-input-inline">
				<input type="text" name="typeDesc" id="typeDesc" required  lay-verify="required" autocomplete="off" class="layui-input">
			</div>
		</div>

		<div class="layui-form-item" style='margin-top: 30px;margin-left:40px;'>
			<div class="layui-input-block">
				<button class="layui-btn" lay-submit="" id='generateTypeBtn' lay-filter="generateTypeBtn"  style=''>创建</button>
			</div>
		</div>


	</form>
</div>

<!-- 修改字典类型弹框 -->
<div id="updateDictType-main" class="layui-layout-body" style="display: none;">
	<form class="layui-form" action=""  id="updateDictTypeAciton" lay-filter="updateDictTypeAciton" >

		<!-- <input type="text" label="typeId" id="typeId-update" required  lay-verify="required" autocomplete="off" class="layui-input" style="display:hidden"> -->
		<div class="layui-form-item">
			<label class="layui-form-label">类別名称</label>
			<div class="layui-input-inline">
				<input type="text" name="typeName" id="typeName-update" required  lay-verify="required" autocomplete="off" class="layui-input">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">类别说明</label>
			<div class="layui-input-inline">
				<input type="text" name="typeDesc" id="typeDesc-update" required  lay-verify="required" autocomplete="off" class="layui-input">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">是否</label>
			<div class="layui-input-inline" id="isCheckedType">
				<!-- <input type="checkbox" id="enable" label="enable" lay-skin="switch" lay-text="YES|NO"> -->
			</div>
		</div>


		<div class="layui-form-item" style='margin-top: 30px;margin-left:40px;'>
			<div class="layui-input-block">
				<button class="layui-btn" lay-submit="" id='updateTypeBtn' lay-filter="updateTypeBtn"  style=''>修改</button>
			</div>
		</div>


	</form>
</div>

<!-- 删除字典类型弹框 -->
<div id="deleteDictType-main" class="layui-layout-body" style="display: none;">
	<form class="layui-form" action=""  id="deleteDictTypeAciton" lay-filter="deleteDictTypeAciton" >

	</form>
</div>

<!-- 添加字典项弹框 -->
<div id="generateItemType-main" class="layui-layout-body" style="display: none;">
	<form class="layui-form" action=""  id="generateDictItemAciton" lay-filter="generateDictItemAciton" >
		<input type="hidden" id="dictLayer"/>
		<input type="hidden" id="dictTypeId"/>
		<input type="hidden" id="dictTypeName"/>

		<div class="layui-form-item">
			<label class="layui-form-label">字典名称</label>
			<div class="layui-input-inline">
				<input type="text" name="itemName" id="itemName" required  lay-verify="required" autocomplete="off" class="layui-input">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">字典说明</label>
			<div class="layui-input-inline">
				<input type="text" name="itemDesc" id="itemDesc" required  lay-verify="required" autocomplete="off" class="layui-input">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">字典键值</label>
			<div class="layui-input-inline">
				<input type="text" name="itemKey" id="itemKey" required  lay-verify="required" autocomplete="off" class="layui-input">
			</div>
		</div>
		<div class="layui-form-item" style='margin-top: 30px;margin-left:40px;'>
			<div class="layui-input-block">
				<button class="layui-btn" lay-submit="" id='generateItemBtn' lay-filter="generateItemBtn"  style=''>创建</button>
			</div>
		</div>


	</form>
</div>

<!-- 修改字典项弹框 -->
<div id="updateDictItem-main" class="layui-layout-body" style="display: none;">
	<form class="layui-form" action=""  id="updateDictItemAciton" lay-filter="updateDictItemAciton" >
		<input type="hidden" id="dictLayer2"/>
		<input type="text" name="itemId" id="itemId-update" required  lay-verify="required" autocomplete="off" class="layui-input" style="display:none">
		<input type="text" name="itemType" id="itemType-update" required  lay-verify="required" autocomplete="off" class="layui-input" style="display:none">
		<input type="hidden" id="dictTypeName2"/>
		<div class="layui-form-item">
			<label class="layui-form-label">字典名称</label>
			<div class="layui-input-inline">
				<input type="text" name="itemName" id="itemName-update" required  lay-verify="required" autocomplete="off" class="layui-input">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">字典说明</label>
			<div class="layui-input-inline">
				<input type="text" name="itemDesc" id="itemDesc-update" required  lay-verify="required" autocomplete="off" class="layui-input">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">字典键值</label>
			<div class="layui-input-inline">
				<input type="text" name="itemKey" id="itemKey-update" required  lay-verify="required" autocomplete="off" class="layui-input">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">是否</label>
			<div class="layui-input-inline" id="isChecked">
				<!-- <input type="checkbox" id="enableItem" label="enableItem" lay-skin="switch" lay-text="YES|NO" checked> -->

			</div>
		</div>


		<div class="layui-form-item" style='margin-top: 30px;margin-left:40px;'>
			<div class="layui-input-block">
				<button class="layui-btn" lay-submit="" id='updateItemBtn' lay-filter="updateItemBtn"  style=''>修改</button>
			</div>
		</div>


	</form>
</div>

</body>
</html>